home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_perl.idb / usr / freeware / catman / p_man / cat3 / Tie::RefHash.Z / Tie::RefHash
Encoding:
Text File  |  1998-10-28  |  2.3 KB  |  133 lines

  1.  
  2.  
  3.  
  4.      TTTTiiiieeee::::::::RRRReeeeffffHHHHaaaasssshhhh((((3333)))) 22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))  TTTTiiiieeee::::::::RRRReeeeffffHHHHaaaasssshhhh((((3333))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.       Tie::RefHash - use references    as hash    keys
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.           require 5.004;
  13.           use Tie::RefHash;
  14.           tie HASHVARIABLE,    'Tie::RefHash',    LIST;
  15.  
  16.           untie HASHVARIABLE;
  17.  
  18.  
  19.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  20.       This module provides the ability to use references as    hash
  21.       keys if you first tie    the hash variable to this module.
  22.  
  23.       It is    implemented using the standard perl TIEHASH interface.
  24.       Please see the tie entry in _p_e_r_l_f_u_n_c(1) and _p_e_r_l_t_i_e(1) for
  25.       more information.
  26.  
  27.      EEEEXXXXAAAAMMMMPPPPLLLLEEEE
  28.           use Tie::RefHash;
  29.           tie %h, 'Tie::RefHash';
  30.           $a = [];
  31.           $b = {};
  32.           $c = \*main;
  33.           $d = \"gunk";
  34.           $e = sub { 'foo' };
  35.           %h = ($a => 1, $b    => 2, $c => 3, $d => 4,    $e => 5);
  36.           $a->[0] =    'foo';
  37.           $b->{foo}    = 'bar';
  38.           for (keys    %h) {
  39.          print ref($_),    "\n";
  40.           }
  41.  
  42.  
  43.      AAAAUUUUTTTTHHHHOOOORRRR
  44.       Gurusamy Sarathy      gsar@umich.edu
  45.  
  46.      VVVVEEEERRRRSSSSIIIIOOOONNNN
  47.       Version 1.2     15 Dec    1996
  48.  
  49.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  50.       _p_e_r_l(1), _p_e_r_l_f_u_n_c(1),    _p_e_r_l_t_i_e(1)
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                        (printed 10/23/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      TTTTiiiieeee::::::::RRRReeeeffffHHHHaaaasssshhhh((((3333)))) 22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))  TTTTiiiieeee::::::::RRRReeeeffffHHHHaaaasssshhhh((((3333))))
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.      Page 2                        (printed 10/23/98)
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.